package jp.sinmetal.trainer.condition;

import org.seasar.framework.beans.util.Beans;

/**
 * 対戦終了ログ取得用コンディション
 *
 * @author sin
 *
 */
public class EndBattleLogCondition extends PagingCondition {
	/**
	 * 大会ID
	 * @author sin
	 */
	public Integer conventionId;

	/**
	 * インスタンスを返す
	 *
	 * @param form
	 * @return
	 */
	public static EndBattleLogCondition getInstance(Object form) {
		return Beans.createAndCopy(EndBattleLogCondition.class, form).execute();
	}

	/**
	 * 大会IDをもとに、インスタンスを返す
	 *
	 * @param conventionId
	 * @return
	 */
	public static EndBattleLogCondition getInstanceByConventionId(Integer conventionId) {
		EndBattleLogCondition condition = new EndBattleLogCondition();
		condition.conventionId = conventionId;
		condition.offsetNum = 0;
		condition.limitNum = 500;
		return condition;
	}
}
